<extend name="Layout/application"/>

<!-- content start -->
<block name="content">
    <div class="admin-content">
        <div class="admin-content-body">
            <div class="am-cf am-padding am-padding-bottom-0">
                <div class="am-fl am-cf">
                    <strong class="am-text-primary am-text-lg">新增友情链接</strong> /
                    <small>Create A New Site</small>
                </div>
            </div>

            <hr>
            <form class="am-form" action="{{:URL('Sites/save')}}" method="post">
                <div data-am-tabs>

                    <div class="am-tabs-bd">
                        <div class="am-form am-tab-panel am-fade am-in am-active" id="tab1">


                            <div class="am-g am-margin-top">
                                <div class="am-u-sm-4 am-u-md-2 am-text-right">链接名称</div>
                                <div class="am-u-sm-8 am-u-md-3 am-u-end col-end">
                                    <input type="text" class="am-input-sm" name="name" >
                                </div>
                            </div>

                            <div class="am-g am-margin-top">
                                <div class="am-u-sm-4 am-u-md-2 am-text-right">所属分类</div>
                                <div class="am-u-sm-8 am-u-md-10">
                                    <select name="site_node_id" data-am-selected="{btnWidth: '27%',  btnStyle: 'secondary', btnSize: 'sm', maxHeight: 100, searchBox: 1}">
                                        <option value="">请选择
                                            <volist name="sitenodes" id="sitenode">

                                        <option value="{{$sitenode->id}}">{{$sitenode->name}}</option>
                                        </volist>

                                        </option>
                                    </select>
                                </div>
                            </div>

                            <div class="am-g am-margin-top">
                                <div class="am-u-sm-4 am-u-md-2 am-text-right">
                                    缩略图
                                </div>
                                <div class="am-u-sm-8 am-u-md-4 am-u-end col-end">
                                    <div class="am-form-group am-form-file new_thumb">
                                        <button type="button" class="am-btn am-btn-success am-btn-sm">
                                            <i class="am-icon-cloud-upload" id="loading"></i> 上传新的缩略图
                                        </button>
                                        <input type="file" id="image_upload">
                                        <input type="hidden" name="photo_id">
                                    </div>
                                    <hr data-am-widget="divider" style="" class="am-divider am-divider-dashed"/>

                                    <div>
                                        <img src="http://oz8rilu2x.bkt.clouddn.com/63835659680e64ef0050810b17ccd05e.png" id="img_show" style="max-height: 200px;">
                                    </div>
                                </div>
                            </div>




                            <div class="am-g am-margin-top">
                                <div class="am-u-sm-4 am-u-md-2 am-text-right">链接网址</div>
                                <div class="am-u-sm-8 am-u-md-3 am-u-end col-end">
                                    <input type="text" class="am-input-sm" name="url" required>
                                </div>
                            </div>

                            <div class="am-g am-margin-top">
                                <div class="am-u-sm-4 am-u-md-2 am-text-right">排序</div>
                                <div class="am-u-sm-8 am-u-md-3 am-u-end col-end">
                                    <input type="text" class="am-input-sm" name="sort" required>
                                </div>
                            </div>

                        </div>
                    </div>
                    <div class="am-margin">
                        <button type="submit" class="am-btn am-btn-primary am-radius">提交保存</button>
                    </div>

                </div>
            </form>

        </div>
    </div>

    <footer class="admin-content-footer">
        <hr>
        <p class="am-padding-left">© 2014 AllMobilize, Inc. Licensed under MIT license.</p>
    </footer>
    <!-- content end -->
</block>
<block name="js">

    <script src="/vendor/html5-fileupload/jquery.html5-fileupload.js"></script>
    <script src="/vendor/html5-fileupload/upload.js"></script>


</block>


